//
//  XMQHttpFileUploader.h
//  testApp
//
//  Created by liaowei on 14-4-18.
//
//

#import <Foundation/Foundation.h>
#import "XMQHttpTransfer.h"


@protocol XMQHttpFileUploaderDelegate ;

@interface XMQHttpFileUploader : XMQFileTansferRequest<XMQHttpFileTransferDelegate>

@property (assign, nonatomic) id<XMQHttpFileUploaderDelegate> uploadDelegate;

@property (strong, nonatomic) NSString *filePathForUpload;

@end


@protocol XMQHttpFileUploaderDelegate <NSObject>

@optional

- (void)httpUploadBegin:(NSNumber *)requestId userObj:(id)userObj
    expectedContentLength:(NSInteger)expectedContentLength;

@required

- (void)httpUpload:(NSNumber *)requestId userObj:(id)userObj
   didSendBodyData:(NSInteger)bytesWritten
 totalBytesWritten:(NSInteger)totalBytesWritten
    totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite;

- (void)httpUploadFailWithError:(NSNumber *)requestId userObj:(id)userObj error:(NSError *)error;

- (void)httpUploadEnd:(NSNumber *)requestId userObj:(id)userObj;

@end